<!--做题页面-翻译-->
<link rel="stylesheet" href="https://file.viplgw.cn/ui/thinku-ielts-new/css/evaluation/question.css">
<script src="/cn/js/jquery-1.12.2.min.js"></script>
<div class="head">
    <input id="startTime" value="" type="hidden">
    <input id="maxtime" value="<?php echo $totalTime?>" type="hidden">
    <input type="hidden" value="<?php echo isset($_GET['subjectId']) ? $_GET['subjectId'] : 1 ?>" id="subjectId">
    <input type="hidden" value="<?php echo isset($_GET['pubId']) ? $_GET['pubId'] : 1 ?>" id="pubId">
    <input type="hidden" value="<?php echo $nextSubject != false ? $nextSubject : 0 ?>" id="nextSubjectId">
    <input type="hidden" value="<?php echo $cateData['type'] ?>" id="type">
    <div class="container">
        <p class="headTitle">申友雅思-<?php echo $cateData['pidName'] ?>测评-<?php echo $cateData['name'] ?></p>
        <p class="timeStr"><img
                    src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/cuttime.png"><span></span></p>
        <p  class="quiteBtn" onclick="quite()"><img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/result/quite.png">Quit</p>
    </div>
</div>
<div class="container main">
    <?php if($list[0]['parent']['question']){?>
    <div class="section directions_box"> <!--词汇题、翻译题、口语-->
        <?php echo $list[0]['parent']['question'] ?>
        <!--        <p class="section_title">Directions:</p>-->
        <!--        <div class="directions_text">Write down the Chinese meanings of the following English words(question 1-18),-->
        <!--            andthe English words-->
        <!--            corresponding to the Chinese meanings(question 19and 20).-->
        <!--        </div>-->
    </div>
    <?php }?>
    <div class="section question_box">

        <p class="section_title">Questions:</p>
        <ul class="translate_question" style="overflow-y: auto ">
            <?php foreach ($list[0]['son'] as $k => $v) { ?>
                <li>
                    <p class="translate_title"><?php echo $v['name'] ?>. <?php echo $v['article'] ?></p>
                    <p><textarea placeholder="请在此输入你的翻译"
                                 oninput="interpret(this,<?php echo $v['id'] ?>,&apos;<?php echo $v['answer'] ?>&apos;,&apos;1&apos;)"></textarea>
                    </p>
                    <?php if ($list[0]['parent']['type'] == 7) { ?>
                        <p class="textarea2"><textarea placeholder="请在此输入你的倒装"
                                     oninput="interpret(this,<?php echo $v['id'] ?>,&apos;<?php echo $v['answer'] ?>&apos;,&apos;2&apos;)"></textarea>
                        </p>
                    <?php } ?>
                </li>
            <?php } ?>
        </ul>
        <p class="next_btn">
            <button class="" onclick="saveAnswer()">Next ></button>
        </p>
    </div>

</div>
<div class="next_modal question_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Response Required
            <img onclick="closeModal(this)" src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>要先选择答案才能继续下一题哦</p>
        </div>
        <div class="modal-footer">
            <button class="nextBtn" onclick="closeModal(this)">OK</button>
        </div>
    </div>
</div>
<div class="next_modal  Quite_modal" style="display: none">
    <div class="modal_dialog">
        <div class="modal-title">
            Quite
            <img onclick="closeModal(this)" src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/close.png">
        </div>
        <div class="modal-body">
            <img src="https://file.viplgw.cn/ui/thinku-ielts-new/images/evaluation/warning.png">

            <p>是否确定退出，退出将不保留测评记录</p>
        </div>
        <div class="modal-footer">
            <button class="noBtn" onclick="closeModal(this)">No</button>
            <button class="yesBtn" onclick="pageBack()">Yes</button>
        </div>
    </div>
</div>
<script src="/cn/js/evaluation/public.js"></script>

<script>
    var dirHei = $('.directions_box').height();
    console.log('dirHei', dirHei)
    var quesHei = "calc(100% - " + dirHei + "px - 50px)";
    var tableHei = "calc(100% -  110px)";
    $('.question_box').css({'height': quesHei});
    $('.translate_question').css({'height': tableHei})

    var startTime = Math.ceil(new Date().getTime() / 1000); //单位秒
    $('#startTime').val(startTime);
    cutTime();
</script>
